package com.dtz.ribbon.rule;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;

@Configuration
public class MyRule {

	/**
	 * 配置ribbon客户端的负载均衡机制，默认为轮询
	 * @return
	 */
	@Bean
	public IRule getIRule() {
		return new RandomRule();
	}
	
}
